Dynamic code generation to dynamically create and deploy messaging provider-specific wrappers for a resource adapter

ABSTRACT

A computer-controlled method can include an application providing a request to a resource adapter and, responsive to receiving the request, the resource adapter instructing a Java Messaging Service (JMS) provider to provide an object. The JMS provider can provide the requested object to the resource adapter. The resource adapter can send to a class loader a request for the class loader to create a class and, responsive thereto, the class loader can create the class and provide it to the resource adapter. The resource adapter can instantiate the class to create a wrapper object, wrap the object based on the wrapper object, and send the wrapped object to the application.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims benefit of provisional patent applications 61/639,786, and 61/639,791, both filed Apr. 27, 2012; and provisional patent applications 61/793,043, 61/793,257, 61/793,459, 61/800,016, and 61/799,391, all filed Mar. 15, 2013, all incorporated by reference herein their entirety.

This application is related to the following co-pending U.S. patent application Ser. Nos., all filed Apr. 29, 2013, all incorporated by reference herein in their entirety:

13/XXX,XXX, (Attorney Docket No. ORA121139-US-NP-3222-0075), “SYSTEM AND METHOD FOR CLUSTERED TRANSACTIONAL INTEROPERABILITY OF MULTIPLE MESSAGING PROVIDERS USING A SINGLE CONNECTOR MECHANISM;”

13/XXX,XXX (Attorney Docket No. ORA130423-US-NP-3222-0076), “SYSTEM AND METHOD FOR CLUSTERED TRANSACTIONAL INTEROPERABILITY OF PROPRIETARY NON-STANDARD FEATURES OF A MESSAGING PROVIDER USING A CONNECTOR MECHANISM;”

13/XXX,XXX (Attorney Docket No. ORA121140-US-NP-3222-0077), “METHOD FOR A CONNECTOR PROVIDING TRANSACTIONAL INTEROPERABILITY TO MULTIPLE MESSAGING PROVIDERS TO MULTIPLE APPLICATION SERVERS USING THE SAME IMPLEMENTATION;”

13/XXX,XXX (Attorney Docket No. ORA130424-US-NP-3222-0078), “SYSTEM AND METHOD FOR A CONNECTOR BEING ABLE TO ADAPT TO NEWER FEATURES INTRODUCED TO A MESSAGING PROVIDER WITH ONLY CONFIGURATION CHANGES;” and

BACKGROUND

Currently, there are a number of tools available for dynamically creating or modifying Java files. A generic example of such a tool is the Byte Code Engineering Library (BCEL). However, these tools are generally designed for a significantly wide domain such as would be associated with containers and application servers. Also, with something like BCEL, someone must write the code that will then write/generate the final code.

Accordingly, there remains a need for a way to address these and other deficiencies associated with the prior art.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of a system in accordance with certain implementations of the disclosed technology.

FIG. 2 illustrates an example of a computer-controlled method in accordance with certain implementations of the disclosed technology.

DETAILED DESCRIPTION

In accordance with an embodiment, a messaging-specific dynamic code generation tool is provided. The messaging-specific dynamic code generation tool is a custom tool for messaging and connector use. There are a lot of novel features in this tool that are specific to the messaging domain. Previous tools, as described above, which were not designed for messaging, do not provide customized features for messaging.

FIG. 1 illustrates an example of a system 100 in accordance with certain implementations of the disclosed technology. In the example, a resource adapter 102 is communicatively coupled between a first device 104 and a second device 106. In certain embodiments, the first device 104 may be or include a messaging provider, such as a Java Messaging Service (JMS) provider, configured to provide an object to the resource adapter and the second device 106 is an application or application server hosting an application, for example.

In certain embodiments, the resource adapter 102 may be configured to receive a request from an application or application server and, responsive to receiving the request, instruct a messaging provider to provide an object. In such embodiments, the messaging provider may be configured to provide the requested object to the resource adapter 102, and the resource adapter 102 may be further configured to send to a class loader 108 a request for the class loader 108 to create a class. The object may be a connection, a session, a queue, a topic, a producer, a message, or a consumer, for example.

The class loader 108 may be configured to create the class and provide the class to the resource adapter 102, and the resource adapter 102 may be further configured to instantiate the class to create a wrapper object 110, wrap the object based on the wrapper object 110, and send the wrapped object to the to the second device 106, which may be or include the application or application server that sent the original request, for example. In certain embodiments, the resource adapter instance may be configured to store the class.

In certain embodiments, the resource adapter 102 may be configured to store a plurality of previously-created classes and also to receive a request from an application or application server and, responsive to receiving the request, instruct a messaging provider to provide an object. In such cases, the messaging provider may be configured to provide the requested object to the resource adapter 102, which may be further configured to instantiate one of the plurality of previously-created classes to create the wrapper object 110, wrap the object based on the wrapper object 110, and send the wrapped object to the application or application server that sent the request to the resource adapter 102.

FIG. 2 illustrates an example of a computer-controlled method 200 in accordance with certain implementations of the disclosed technology. At 202, an application or application server may provide a request to a resource adapter. Certain embodiments may include an application that is managed by an application server. In such embodiments, the application may reside on the application server.

Responsive to receiving the request, the resource adapter may instruct a messaging provider, such as a Java Messaging Service (JMS) provider, to provide an object, as indicated at 204. Responsive thereto, the messaging provider may provide the requested object to the resource adapter, as indicated at 206. At 208, the resource adapter may send to a class loader a request for the class loader to create a class. The class loader may then create the class and provide the class to the resource adapter, as indicated at 210.

At 212, the resource adapter may instantiate the class to create a wrapper object. At 214, the resource adapter may wrap the object based on the wrapper object. At 216, the resource adapter may send the wrapped object to the application or application server. In certain embodiments, the resource adapter instance may store the class. In certain embodiments, the resource adapter instance may store a plurality of previously-created classes and instantiate one of the stored classes to create the wrapper object used by the resource adapter to wrap the object.

The following discussion is intended to provide a brief, general description of a suitable machine in which embodiments of the disclosed technology can be implemented. As used herein, the term “machine” is intended to broadly encompass a single machine or a system of communicatively coupled machines or devices operating together. Exemplary machines may include computing devices such as personal computers, workstations, servers, portable computers, handheld devices, tablet devices, and the like.

Typically, a machine includes a system bus to which processors, memory such as random access memory (RAM), read-only memory (ROM), and other state-preserving medium, storage devices, a video interface, and input/output interface ports can be attached. The machine may also include embedded controllers such as programmable or non-programmable logic devices or arrays, Application Specific Integrated Circuits (ASICs), embedded computers, smart cards, and the like. The machine may be controlled, at least in part, by input from conventional input devices such as keyboards and mice, as well as by directives received from another machine, interaction with a virtual reality (VR) environment, biometric feedback, or other pertinent input.

The machine may utilize one or more connections to one or more remote machines, such as through a network interface, modem, or other communicative coupling. Machines can be interconnected by way of a physical and/or logical network, such as an intranet, the Internet, local area networks, wide area networks, etc. One having ordinary skill in the art will appreciate that network communication may utilize various wired and/or wireless short range or long range carriers and protocols, including radio frequency (RF), satellite, microwave, Institute of Electrical and Electronics Engineers (IEEE) 545.11, Bluetooth, optical, infrared, cable, laser, etc.

Embodiments of the disclosed technology may be described by reference to or in conjunction with associated data including functions, procedures, data structures, application programs, instructions, etc. that, when accessed by a machine, may result in the machine performing tasks or defining abstract data types or low-level hardware contexts. Associated data may be stored in, for example, volatile and/or non-volatile memory, such as RAM and ROM, or in other storage devices and their associated storage media, which can include hard-drives, floppy-disks, optical storage, tapes, flash memory, memory sticks, digital video disks, biological storage, and other non-transitory, physical storage media.

Associated data may be delivered over transmission environments, including the physical and/or logical network, in the form of packets, serial data, parallel data, etc., and may be used in a compressed or encrypted format. Associated data may be used in a distributed environment, and stored locally and/or remotely for machine access.

Having described and illustrated the principles of the invention with reference to illustrated embodiments, it will be recognized that the illustrated embodiments may be modified in arrangement and detail without departing from such principles, and may be combined in any desired manner. And although the foregoing discussion has focused on particular embodiments, other configurations are contemplated. In particular, even though expressions such as “according to an embodiment of the invention” or the like are used herein, these phrases are meant to generally reference embodiment possibilities, and are not intended to limit the invention to particular embodiment configurations. As used herein, these terms may reference the same or different embodiments that are combinable into other embodiments.

Consequently, in view of the wide variety of permutations to the embodiments described herein, this detailed description and accompanying material is intended to be illustrative only, and should not be taken as limiting the scope of the invention. What is claimed as the invention, therefore, is all such modifications as may come within the scope and spirit of the following claims and equivalents thereto. 

We claim:
 1. A computer-controlled method, comprising: an application providing a request to a resource adapter; responsive to receiving the request, the resource adapter instructing a messaging provider to provide an object; and the messaging provider providing the requested object to the resource adapter; the resource adapter sending to a class loader a request for the class loader to create a class; the class loader creating the class; the class loader providing the class to the resource adapter; the resource adapter instantiating the class to create a wrapper object; the resource adapter wrapping the object based on the wrapper object; the resource adapter sending the wrapped object to the application.
 2. The computer-controlled method of claim 1, wherein the application is managed by an application server.
 3. The computer-controlled method of claim 2, wherein the application resides on the application server.
 4. The computer-controlled method of claim 1, wherein the object is one of a group consisting of the following: a connection, a session, a queue, a topic, a producer, a message, and a consumer.
 5. The computer-controlled method of claim 1, further comprising the resource adapter instance storing the class.
 6. The computer-controlled method of claim 1, wherein the messaging provider is a Java Messaging Service (JMS) provider.
 7. One or more non-transitory computer-readable media storing instructions that, when executed by a processor, cause the processor to perform the computer-controlled method of claim
 1. 8. A computer-controlled method, comprising: an application providing a request to a resource adapter; responsive to receiving the request, the resource adapter instructing a messaging provider to provide an object; and the messaging provider providing the requested object to the resource adapter; the resource adapter instance storing a plurality of previously-created classes; the resource adapter instantiating one of the stored classes to create a wrapper object; the resource adapter wrapping the object based on the wrapper object; the resource adapter sending the wrapped object to the application.
 9. The computer-controlled method of claim 8, wherein the application is managed by an application server.
 10. The computer-controlled method of claim 9, wherein the application resides on the application server.
 11. The computer-controlled method of claim 8, wherein the object is one of a group consisting of the following: a connection, a session, a queue, a topic, a producer, a message, and a consumer.
 12. The computer-controlled method of claim 8, wherein the messaging provider is a Java Messaging Service (JMS) provider.
 13. One or more non-transitory computer-readable media storing instructions that, when executed by a processor, cause the processor to perform the computer-controlled method of claim
 8. 14. A system, comprising: a messaging provider; a first device hosting an application or application server configured to provide a request; a second device hosting a resource adapter configured to receive the request from the application or application server and, responsive to receiving the request, instruct the messaging provider to provide an object, wherein the messaging provider is configured to provide the requested object to the resource adapter, wherein the resource adapter is further configured to send to a class loader a request for the class loader to create a class, wherein the class loader is configured to create the class and provide the class to the resource adapter, and wherein the resource adapter is further configured to instantiate the class to create a wrapper object, wrap the object based on the wrapper object, and send the wrapped object to the application or application server; and a class loader configured to receive from the resource adapter a request to create the class, create the class, and provide the created class to the resource adapter.
 15. The system of claim 14, wherein the resource adapter instance is configured to store the class.
 16. The system of claim 14, wherein the messaging provider is a Java Messaging Service (JMS) provider.
 17. A system, comprising: a messaging provider; a first device hosting an application or application server configured to provide a request; a second device hosting a resource adapter configured to store a plurality of previously-created classes and also to receive the request from the application or application server and, responsive to receiving the request, instruct the messaging provider to provide an object, wherein the messaging provider is configured to provide the requested object to the resource adapter, and wherein the resource adapter is further configured to instantiate one of the plurality of previously-created classes to create a wrapper object, wrap the object based on the wrapper object, and send the wrapped object to the application or application server.
 18. The system of claim 17, wherein the messaging provider is a Java Messaging Service (JMS) provider. 